import request from '@/utils/request'
export function fetchList(params) {
  return request({
    url:'/order/list',
    method:'get',
    params:params
  })
}

export function closeOrder(params) {
  return request({
    url:'/order/update/close',
    method:'post',
    params:params
  })
}

export function deleteOrder(params) {
  return request({
    url:'/order/delete',
    method:'post',
    params:params
  })
}

export function deliveryOrder(data) {
  return request({
    url:'/order/update/delivery',
    method:'post',
    data:data
  });
}

export function getOrderDetail(id) {
  return request({
    url:'/order/'+id,
    method:'get'
  });
}

export function updateReceiverInfo(data) {
  return request({
    url:'/order/update/receiverInfo',
    method:'post',
    data:data
  });
}

export function updateMoneyInfo(data) {
  return request({
    url:'/order/update/moneyInfo',
    method:'post',
    data:data
  });
}

export function updateOrderNote(params) {
  return request({
    url:'/order/update/note',
    method:'post',
    params:params
  })
}


export function checkOrderRank(params) {
  return request({
    url:'/statistic/order/day/rank',
    method:'post',
    data:params
  })
}

export function exportsOrders(params) {
  return request({
    url:'/order/export',
    method:'get',
    params:params
  })
}

export function getExpressList(id) {
  return request({
    url:'order/list/logistics/'+id,
    method:'post',
  })
}

export function setExpressInfo(params) {
  return request({
    url:'/order/record/logistics',
    method:'post',
    data:params
  })
}

export function getCompanyAdressList() {
  return request({
    url:'/companyAddress/list',
    method:'get'
  })
}

export function updateCompanyAdressList(params) {
  return request({
    url:'/companyAddress/upsert',
    method:'post',
    data:params
  })
}

export function delCompanyAdressList(id) {
  return request({
    url:'/companyAddress/del/'+id,
    method:'get'
  })
}